From: Paul Eggert Date: Sun, 5 Feb 2017 22:07:11 +0000 (-0800) Subject: Port to clang 3.8.0 X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~21^2~1873^2~27 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d45dbccc5d2360818e70bbb0bc816c62c8cf6cbe;p=emacs.git Port to clang 3.8.0 It does not allow a for-loop's control var to be an anonymous struct. * src/lisp.h (struct for_each_tail_internal): New type. (FOR_EACH_TAIL_INTERNAL): Use it. --- diff --git a/src/lisp.h b/src/lisp.h index edbd15170f8..b753971fb9c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4603,6 +4603,14 @@ enum #define FOR_EACH_TAIL_SAFE(list) \ FOR_EACH_TAIL_INTERNAL (list, (void) 0, (void) (li.tail = Qnil), false) +/* Iterator intended for use only within FOR_EACH_TAIL_INTERNAL. */ +struct for_each_tail_internal +{ + Lisp_Object tail, tortoise; + intptr_t max, n; + unsigned short int q; +}; + /* Like FOR_EACH_TAIL (LIST), except evaluate DOTTED or CYCLE, respectively, if a dotted list or cycle is found, and check for quit if CHECK_QUIT. This is an internal macro intended for use @@ -4619,9 +4627,7 @@ enum is little point to calling maybe_quit here. */ #define FOR_EACH_TAIL_INTERNAL(list, dotted, cycle, check_quit) \ - for (struct { Lisp_Object tail, tortoise; intptr_t max, n; \ - unsigned short int q; \ - } li = { list, list, 2, 0, 2 }; \ + for (struct for_each_tail_internal li = { list, list, 2, 0, 2 }; \ CONSP (li.tail) || (dotted, false); \ (li.tail = XCDR (li.tail), \ ((--li.q != 0 \